<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      rsync-3.1.3
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;15.&nbsp;Networking Programs
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="rpcbind.html" title="rpcbind-1.2.5">Prev</a>
          <p>
            rpcbind-1.2.5
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="samba.html" title="Samba-4.11.6">Next</a>
          <p>
            Samba-4.11.6
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="netprogs.html" title=
          "Chapter&nbsp;15.&nbsp;Networking Programs">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="rsync" name="rsync"></a>rsync-3.1.3
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to rsync
        </h2>
        <p>
          The <span class="application">rsync</span> package contains the
          <span class="command"><strong>rsync</strong></span> utility. This
          is useful for synchronizing large file archives over a network.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://www.samba.org/ftp/rsync/src/rsync-3.1.3.tar.gz">https://www.samba.org/ftp/rsync/src/rsync-3.1.3.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 1581a588fde9d89f6bc6201e8129afaf
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 884 KB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 11 MB (with tests - additional
                45 MB for HTML API documentation)
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.5 SBU (with tests)
              </p>
            </li>
          </ul>
        </div>
        <h3>
          rsync Dependencies
        </h3>
        <h4>
          Recommended
        </h4>
        <p class="recommended">
          <a class="xref" href="../general/popt.html" title=
          "Popt-1.16">popt-1.16</a>
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/rsync">http://wiki.linuxfromscratch.org/blfs/wiki/rsync</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of rsync
        </h2>
        <p>
          For security reasons, running the <span class=
          "application">rsync</span> server as an unprivileged user and group
          is encouraged. If you intend to run <span class=
          "command"><strong>rsync</strong></span> as a daemon, create the
          <code class="systemitem">rsyncd</code> user and group with the
          following commands issued by the <code class=
          "systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">groupadd -g 48 rsyncd &amp;&amp;
useradd -c "rsyncd Daemon" -d /home/rsync -g rsyncd \
    -s /bin/false -u 48 rsyncd</kbd>
</pre>
        <p>
          Install <span class="application">rsync</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class=
"command">./configure --prefix=/usr --without-included-zlib &amp;&amp;
make</kbd>
</pre>
        <p>
          If you have <a class="xref" href="../general/doxygen.html" title=
          "Doxygen-1.8.17">Doxygen-1.8.17</a> installed and wish to build
          HTML API documentation, issue:
        </p>
        <pre class="userinput">
<kbd class="command">doxygen</kbd>
</pre>
        <p>
          To test the results, issue: <span class="command"><strong>make
          check</strong></span>.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install</kbd>
</pre>
        <p>
          If you built the documentation, install it using the following
          commands as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class=
"command">install -v -m755 -d          /usr/share/doc/rsync-3.1.3/api &amp;&amp;
install -v -m644 dox/html/*  /usr/share/doc/rsync-3.1.3/api</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <em class="parameter"><code>--without-included-zlib</code></em>:
          This switch enables compilation with system-installed zlib library.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring rsync
        </h2>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="rsync-config" name="rsync-config"></a>
          </h3>
          <h4 class="title">
            <a id="rsync-config" name="rsync-config"></a>Config Files
          </h4>
          <p>
            <code class="filename">/etc/rsyncd.conf</code>
          </p>
        </div>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3"></h3>
          <h4 class="title">
            <a id="idm45779259819968" name=
            "idm45779259819968"></a>Configuration Information
          </h4>
          <p>
            For client access to remote files, you may need to install the
            <a class="xref" href="../postlfs/openssh.html" title=
            "OpenSSH-8.2p1">OpenSSH-8.2p1</a> package to connect to the
            remote server.
          </p>
          <p>
            This is a simple download-only configuration to set up running
            <span class="command"><strong>rsync</strong></span> as a server.
            See the rsyncd.conf(5) man-page for additional options (i.e.,
            user authentication).
          </p>
          <pre class="root">
<kbd class="command">cat &gt; /etc/rsyncd.conf &lt;&lt; "EOF"
<code class="literal"># This is a basic rsync configuration file
# It exports a single module without user authentication.

motd file = /home/rsync/welcome.msg
use chroot = yes

[localhost]
    path = /home/rsync
    comment = Default rsync module
    read only = yes
    list = yes
    uid = rsyncd
    gid = rsyncd
</code>
EOF</kbd>
</pre>
          <p>
            You can find additional configuration information and general
            documentation about <span class=
            "command"><strong>rsync</strong></span> at <a class="ulink" href=
            "http://rsync.samba.org/documentation.html">http://rsync.samba.org/documentation.html</a>.
          </p>
        </div>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="rsync-init" name="rsync-init"></a>
          </h3>
          <h4 class="title">
            <a id="rsync-init" name="rsync-init"></a><span class=
            "phrase">Boot Script</span>
          </h4>
          <p>
            Note that you only want to start the <span class=
            "application">rsync</span> server if you want to provide an
            <span class="application">rsync</span> archive on your local
            machine. You don't need this <span class="phrase">script</span>
            to run the <span class="application">rsync</span> client.
          </p>
          <p>
            Install the <span class="phrase"><code class=
            "filename">/etc/rc.d/init.d/rsyncd</code> init script</span>
            included in the <a class="xref" href=
            "../introduction/bootscripts.html" title=
            "BLFS Boot Scripts">blfs-bootscripts-20191204</a> package.
          </p>
          <pre class="root">
<kbd class="command">make install-rsyncd</kbd>
</pre>
        </div>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Program:</strong>
              <span class="segbody">rsync</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">None</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">Optionally,
              /usr/share/doc/rsync-3.1.3</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="rsync-prog" name="rsync-prog"></a><span class=
                    "term"><span class=
                    "command"><strong>rsync</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a replacement for <span class=
                    "command"><strong>rcp</strong></span> (and <span class=
                    "command"><strong>scp</strong></span>) that has many more
                    features. It uses the <span class=
                    "quote">&ldquo;<span class="quote">rsync
                    algorithm</span>&rdquo;</span> which provides a very fast
                    method of syncing remote files. It does this by sending
                    just the differences in the files across the link,
                    without requiring that both sets of files are present at
                    one end of the link beforehand.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-17 12:12:55 -0800
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="rpcbind.html" title="rpcbind-1.2.5">Prev</a>
          <p>
            rpcbind-1.2.5
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="samba.html" title="Samba-4.11.6">Next</a>
          <p>
            Samba-4.11.6
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="netprogs.html" title=
          "Chapter&nbsp;15.&nbsp;Networking Programs">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
